package com.itheima.reggie.service.impl;

import com.itheima.reggie.entity.Employee;
import com.itheima.reggie.mapper.EmployeeMapper;
import com.itheima.reggie.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    EmployeeMapper employeeMapper;
    @Override
    public Employee getByUsername(String Username){
        return employeeMapper.getByUsername(Username);
    };
    @Override
    public int save(Employee employee){
        return employeeMapper.save(employee);
    };

    @Override
    public List<Employee> getAll(){
        return employeeMapper.getAll();
    };

    @Override
    public List<Employee> getByname(String name){return employeeMapper.getByname(name);};

    @Override
    public int updateById(Employee employee){
        return employeeMapper.updateById(employee);
    };
    @Override
    public int banById(Employee employee){return employeeMapper.banById(employee);};

    @Override
    public Employee getById(Long id){
        return employeeMapper.getById(id);
    };
}
